package com.system.manager.modules.risk.controller;


import com.system.manager.common.annotation.PreAuthorize;
import com.system.manager.common.entity.PageDTO;
import com.system.manager.common.entity.Result;
import com.system.manager.modules.authorized.enums.SubjectType;
import com.system.manager.modules.risk.entity.Station;
import com.system.manager.modules.risk.entity.TbFile;
import com.system.manager.modules.risk.service.IStationService;
import com.system.manager.modules.risk.service.ITbFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yxp
 * @since 2021-11-04
 */
@Slf4j
@Api(tags = "部门管理")
@RestController
@RequestMapping("/risk/station/")
public class StationController {
    @Autowired
    private IStationService iStationService;

    @ApiOperation("查看所有的部门")
    @PreAuthorize({SubjectType.SYSTEM_ADMIN,SubjectType.RISK_ADMIN})
    @GetMapping("list")
    public Result riskFile() {
        List<Station> list = iStationService.list();
        return Result.ok(list);
    }

}
